#include "Triangle.h"

/// <Summary> The collision type of this object </Summary>
const HashString Triangle::COLLISIONTYPE("COLLISION_TRIANGLE");

////////////////////////////////////////////////////////////////////////////////////////////////////
/// <Summary>	Prints this object to the console </Summary>
///
/// <Param name="out">	The console window </Param>
///
/// <Return>	The console window </Return>
////////////////////////////////////////////////////////////////////////////////////////////////////
ConsoleWindow& Triangle::Print(ConsoleWindow& out) const
{
	out << "\nTRIANGLE:";

	if(verts == NULL)
	{
		out << "\nVERTS ARE NULL\n";
	}
	else
	{

		for(int i = 0 ; i < 3; ++i)
		{
			out << "\nVert " << i << ": " << verts[indices[i]];
		}

	}

	if(normal == NULL)
	{
		out << "\nNORMAL IS NULL\n";
	}
	else
	{
		out << "\nNormal " << *normal;
	}

	return out;
}